﻿@model BugChang.DES.Application.Departments.Dtos.DepartmentEditDto
@using BugChang.DES.Web.Mvc.Models.Common
<form id="DepartmentEditForm" method="post" asp-controller="Department" asp-action="Edit">
    @Html.Partial("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel("修改机构"))
    <div class="modal-body">
        <input type="hidden" asp-for="Id" value="@Model.Id" />
        <input type="hidden" asp-for="CreateBy" value="@Model.CreateBy" />
        <input type="hidden" asp-for="CreateTime" value="@Model.CreateTime" />
        <input type="hidden" asp-for="UpdateBy" value="@Model.UpdateBy" />
        <input type="hidden" asp-for="UpdateTime" value="@Model.UpdateTime" />
        <input type="hidden" id="DefaultValue" data-channel="@Model.ReceiveChannel" data-parent-id="@Model.ParentId" />
        <div class="form-group">
            <label>上级机构</label>
            <select class="form-control edit-parent-select" asp-for="ParentId" style="width: 100%"></select>
        </div>
        <div class="form-group">
            <label>名称</label>
            <input type="text" class="form-control" asp-for="Name" value="@Model.Name">
        </div>
        <div class="form-group">
            <label>全称</label>
            <input type="text" class="form-control" asp-for="FullName" value="@Model.FullName" placeholder="无特殊情况无需填写">
        </div>
        <div class="form-group">
            <label>地址</label>
            <input type="text" class="form-control" asp-for="Address" value="@Model.Address" placeholder="例：北京市">
        </div>
        <div class="form-group">
            <label>机构代码</label>
            <input type="text" class="form-control" asp-for="Code" value="@Model.Code">
        </div>
        <div class="form-group">
            <label>默认收件渠道</label>
            <select class="form-control edit-channel-select" asp-for="ReceiveChannel" style="width: 100%"></select>
        </div>
        <div class="form-group">
            <label>排序</label>
            <input type="number" class="form-control" asp-for="Sort" />
        </div>
    </div>
    @Html.Partial("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
</form>
<script src="~/views-resource/department/_editDepartmentModal.js" asp-append-version="true"></script>